package com.kx.core.configuration;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.annotation.PropertySources;
import org.springframework.stereotype.Component;

/**
 * 加载配置文件
 * @author     Kangx.li 1703054
 * @version    V1 2018年11月21日
 * @since      Java
 */
@Configurable
@PropertySource("classpath:jdbc.properties")
//@PropertySources({@PropertySource("classpath:jdbc.properties"),@PropertySource("classpath:jdbc.properties")})
@Component
public class JdbcConfiguration {
    	@Value("${jdbc.url}")
	private String url;
	
	@Value("${jdbc.driverClassName}")
	private String driverClassName;
	
	@Value("${jdbc.port}")
	private int port;

	public String getUrl() {
		return url;
	}

	public String getDriverClassName() {
		return driverClassName;
	}

	public int getPort() {
		return port;
	}
}

